package com.zhou.provider.controller;

import com.zhou.provider.service.UserService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zhou.common.domain.*;
/**
 * @author zkb
 */
@RestController
public class TestController {

    private static final org.slf4j.Logger Logger = LoggerFactory.getLogger(TestController.class);


    @Autowired
    private UserService userService;


    @RequestMapping(value = "/",method = RequestMethod.GET)
    public String getIndex() {
        return "index";
    }

    @GetMapping("/user/{id}")
    public User findUserById(@PathVariable Long id) {
        return this.userService.findUserById(id);
    }
}
